package com.gg.user.gguser.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;


@Configuration
public class InterceptorConfig implements  WebMvcConfigurer {

    @Autowired
    private LogoInterceptor interceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //registry.addInterceptor(interceptor).excludePathPatterns("/static/**");
        // registry.addInterceptor(interceptor).addPathPatterns("/**"); ,"/**.css?**","/**.html","/**.js","/**.jpeg","/**.png","/**.gif","/**.svg","/**.bmp","/**.jpg"
        registry.addInterceptor(new LogoInterceptor()).addPathPatterns("/**").excludePathPatterns("/login","/search","/css/**","/**.html","/js/**","/font/**","/fonts/**","/images/**","/lay/**","/**.js");
    }



}
